//
//  WYCMeWalletController.m
//  51信用卡
//
//  Created by 中企互联 on 2017/11/2.
//  Copyright © 2017年 中企互联. All rights reserved.
//

#import "WYCMeWalletController.h"
#import "WYCRechargeController.h"
#import "WYCDrawalsController.h"
#import "QLCycleProgressView.h"
#import "XYWaterWaveView.h"
#import "WYCBenefitController.h"

@interface WYCMeWalletController ()
@property (nonatomic, strong) QLCycleProgressView *progressView;

@end

@implementation WYCMeWalletController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    
    
    //界面布局
    [self setupCreat];
    
    
    //底部的充值和提ui
//    [self setupBotton];
    
    
    
}

- (QLCycleProgressView *)progressView {
    if (!_progressView) {
        _progressView = [[QLCycleProgressView alloc]initWithFrame:CGRectMake(160 * px, NavHeight * 3, ScreenWidth - 320 * px, _progressView.width)];
    }
    return _progressView;
}


#pragma make ------->>界面布局
- (void)setupCreat{
    
    self.navigationItem.title = @"我的钱包";
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    [self.navigationController.navigationBar setBarTintColor:wycMain];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
//    self.navigationItem.rightBarButtonItem = [UIBarButtonItem itemWithTitle:@"分润明细" target:self action:@selector(rightClick)];
    
    
    [self.view addSubview:self.progressView];
    _progressView.progress = 1;
    
    
    UIButton * backButton = [[UIButton alloc] init];
    backButton.frame = CGRectMake(80 * px, 1100 * px, ScreenWidth - 160 * px, 150 * px);
    [backButton addTarget:self action:@selector(backButtonClick) forControlEvents:UIControlEventTouchUpInside];
    [backButton setTitle:@"提现" forState:UIControlStateNormal];
    backButton.titleLabel.font = [UIFont systemFontOfSize:BigFont];
    [backButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    backButton.layer.cornerRadius = 75 * px;
    backButton.backgroundColor = wycMain;
    [self.view addSubview:backButton];
    
    
    XYWaterWaveView *waveView = [[XYWaterWaveView alloc] initWithFrame:CGRectMake(0, ScreenHeight - 120, ScreenWidth, 120)];
    [self.view addSubview:waveView];
    
    UILabel * moneylabel = [[UILabel alloc] init];
    moneylabel.frame = CGRectMake(backButton.x, CGRectGetMaxY(backButton.frame) + 120 * px, backButton.width, 60 * px);
//    moneylabel.text = @"0.00";
    moneylabel.font = MiddleLight;
    moneylabel.textAlignment = NSTextAlignmentCenter;
    moneylabel.font = [UIFont systemFontOfSize:BigMiddleFont];
    moneylabel.textColor = wycMain;
    [self.view addSubview:moneylabel];
    
    
    
    UILabel * money = [[UILabel alloc] init];
    money.frame = CGRectMake(moneylabel.x, CGRectGetMaxY(moneylabel.frame) + 80 * px, moneylabel.width, 60 * px);
//    money.text = @"累计分润(元)";
    money.font = MiddleLight;
    money.textAlignment = NSTextAlignmentCenter;
    money.font = [UIFont systemFontOfSize:BigMiddleFont];
    money.textColor = wycMain;
    [self.view addSubview:money];
    

    
    
    
}

#pragma make ------>>充值事件
- (void)RechargeButtonClick{
    WYCRechargeController * recharge = [[WYCRechargeController alloc] init];
    [self.navigationController pushViewController:recharge animated:NO];
    
}


#pragma make ------>>提现事件
- (void)WithdrawalsButtonClick{
    WYCDrawalsController * drawals = [[WYCDrawalsController alloc] init];
    [self.navigationController pushViewController:drawals animated:NO];
    
}

#pragma make ------>>进入控制器隐藏
//- (void)viewWillAppear:(BOOL)animated {
//    [super viewWillAppear:animated];
//    
//    [self.navigationController setNavigationBarHidden:YES animated:YES];
//}
//#pragma make ------>>离开控制器显示
//- (void)viewWillDisappear:(BOOL)animated {
//    [super viewWillDisappear:animated];
//    
//    [self.navigationController setNavigationBarHidden:NO animated:YES];
//}

#pragma mark -------->>分润明细
- (void)rightClick{
    WYCLogFunc;
    WYCBenefitController * Bennefit = [[WYCBenefitController alloc] init];
    [self.navigationController pushViewController:Bennefit animated:NO];
    
}

#pragma make -------->>返回按钮点击事件
- (void)backButtonClick{
    
    [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"努力开发中"];
//    [self.navigationController popViewControllerAnimated:NO];
    
}
@end
